import request from '@/utils/request'
import { memberApi } from '@/utils/comm'

// 查询列表
export function listCertificateType(query) {
  return request({
    url: `${memberApi}/certificateType/list`,
    method: 'get',
    params: query
  })
}

// 查询详情
export function getCertificateType(id) {
  return request({
    url: `${memberApi}/certificateType/` + id,
    method: 'get'
  })
}

// 新增
export function addCertificateType(data) {
  return request({
    url: `${memberApi}/certificateType`,
    method: 'post',
    data: data
  })
}

// 修改
export function updateCertificateType(data) {
  return request({
    url: `${memberApi}/certificateType`,
    method: 'put',
    data: data
  })
}

// 删除
export function delCertificateType(id) {
  return request({
    url: `${memberApi}/certificateType/` + id,
    method: 'delete'
  })
}

// 查询所有飞员证书类型列表
export function listAllCertificateType(query) {
  return request({
    url: `${memberApi}/certificateType/optionSelect`,
    method: 'get',
    params: query
  })
}